package com.exam.demo.commom;

import lombok.Getter;

@Getter
public enum HttpCodeEnum {
    // 通用：成功与失败
    SUCCESS(200, "操作成功！"),
    FAIL(400, "操作失败!"),
    // 登录失败
    LOGIN_FAIL(10000,"登录失败!"),
    //用户名已存在
    USER_EXIST(10001,"用户名已存在!"),
    //用户名不存在
    USER_NOT_EXIST(10002,"用户名不存在!"),
    //注册失败
    REGISTER_FAIL(10003,"注册异常!"),
    //密码错误
    PASSWORD_ERROR(10004,"密码错误!")
    ;

    int code;
    String msg;

    HttpCodeEnum(int code, String errorMessage) {
        this.code = code;
        this.msg = errorMessage;
    }

}